import SimpleITK as sitk
path_image=r"Data_folder/train/images/0.nii"
path_label=r"Data_folder/train/labels/0.nii"

img=sitk.ReadImage(path_image)
label=sitk.ReadImage(path_label)
print(sitk.GetArrayFromImage(img).shape)
print(sitk.GetArrayFromImage(label).shape)